import request from '@/utils/request'
// 登录功能
export function getDepartmentsList() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}

// 添加部门功能
export function addDepartmentsList(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 获取部门详情功能
export function getDepartmentsById(id) {
  return request({
    url: `/company/department/${id}`
  })
}

// 保存编辑部门功能
export function setDepartmentsById(data) {
  return request({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

// 删除部门功能
export function delDepartmentsById(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'DELETE'
  })
}
